#ifndef SERIALFRAME_H
#define SERIALFRAME_H

#include <QObject>
#include <QList>
#include <QByteArray>

class SerialFrame : public QObject
{
    Q_OBJECT
public:
    explicit SerialFrame(QObject *parent = 0);
    //从数据链路层数据流中提取应用层数据帧
    void extractAPLframe();
    //将应用层数据帧转换为数据链路层数据流
    void generateDLLframe(QByteArray &msg);
    //判断校验和
    bool verify(QByteArray &msg);

signals:

private slots:

private:
    //提取应用层数据帧
    void analysisFrame(QByteArray &msg);
    //添加校验和
    void addCheckSum(QByteArray &msg);
    QList<QByteArray> aplRcvFrameBuffer;
};

#endif // SERIALFRAME_H
